<iframe th:replace="common/top.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
<link rel="StyleSheet" href="css/category.css" type="text/css" media="screen"/>

<div id="Category" style="text-align: center">
  <h1>商品类别</h1>

    <form method="post" action="/category/add">
       <label >新增商品类别</label>
        <input type="text" name="name" required>
        <input type="submit" name="添加种类" class="button">
    </form>
    <table >
<!--        <tr>-->
<!--            已有商品类别-->
<!--        </tr>-->
        <tr>
            <th>名称</th>
            <th  colspan="3">操作</th>
        </tr>

        <tr th:each="category:${categoryList}">
            <td th:text="${category.name}" id="categoryName"></td>
<!--            <td th:utext="${category.page}"></td>-->
            <td><a th:href="@{/category2/view(catid=${category.catid})}">修改</a></td>
            <td><a th:href="@{/category/delete(name=${category.name})}">删除</a></td>
            <td><a th:href="@{/category2/addproduct(catid=${category.catid})}">新增商品</a></td>
        </tr>
<!--        <a th:href="@{/category/addView}">增加种类</a>-->
    </table>
<!--    <form method="post" action="/category/add">-->
<!--        新增商品类别<br>-->
<!--        <input type="text" name="name"><br>-->
<!--        <input type="submit" name="添加种类" class="button">-->
<!--    </form>-->


</div>


<!--<iframe th:replace="common/bottom.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>-->


